package com.dragon.modules.yuegou.query.act;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.act.GiftBagProRefEntity;
import com.dragon.modules.yuegou.enums.act.GiftBagProRefSkuType;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

/**
 * 礼包商品对应关系表 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2020-08-06 11:17:10
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class GiftBagProRefQuery extends GiftBagProRefEntity implements Query<GiftBagProRefEntity> {

    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 礼包id查询条件 */
	@JsonUnwrapped(prefix = "giftBagId")
	private Condition<String> giftBagIdCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "busdId")
	private Condition<String> busdIdCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "spuId")
	private Condition<String> spuIdCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "skuId")
	private Condition<String> skuIdCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "title")
	private Condition<String> titleCondition;

    /** 数量查询条件 */
	@JsonUnwrapped(prefix = "num")
	private Condition<Integer> numCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "templateId")
	private Condition<String> templateIdCondition;

    /** [枚举]商品类型：0-优质好货-SKU、1-停车券-PARKCOUPON、2-现金券-CASHCOUPON查询条件 */
	@JsonUnwrapped(prefix = "skuType")
	private Condition<GiftBagProRefSkuType> skuTypeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public GiftBagProRefQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public GiftBagProRefQuery(GiftBagProRefEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public GiftBagProRefQuery(GiftBagProRefQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.giftBagIdCondition != null) {
			this.giftBagIdCondition = other.giftBagIdCondition.copy();
		}
		if(other.busdIdCondition != null) {
			this.busdIdCondition = other.busdIdCondition.copy();
		}
		if(other.spuIdCondition != null) {
			this.spuIdCondition = other.spuIdCondition.copy();
		}
		if(other.skuIdCondition != null) {
			this.skuIdCondition = other.skuIdCondition.copy();
		}
		if(other.titleCondition != null) {
			this.titleCondition = other.titleCondition.copy();
		}
		if(other.numCondition != null) {
			this.numCondition = other.numCondition.copy();
		}
		if(other.templateIdCondition != null) {
			this.templateIdCondition = other.templateIdCondition.copy();
		}
		if(other.skuTypeCondition != null) {
			this.skuTypeCondition = other.skuTypeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<GiftBagProRefEntity> toQueryWrapper() {
		QueryWrapper<GiftBagProRefEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (giftBagIdCondition != null) {
			giftBagIdCondition.toWrapper(wrapper, COL_GIFT_BAG_ID);
		}
		if (busdIdCondition != null) {
			busdIdCondition.toWrapper(wrapper, COL_BUSD_ID);
		}
		if (spuIdCondition != null) {
			spuIdCondition.toWrapper(wrapper, COL_SPU_ID);
		}
		if (skuIdCondition != null) {
			skuIdCondition.toWrapper(wrapper, COL_SKU_ID);
		}
		if (titleCondition != null) {
			titleCondition.toWrapper(wrapper, COL_TITLE);
		}
		if (numCondition != null) {
			numCondition.toWrapper(wrapper, COL_NUM);
		}
		if (templateIdCondition != null) {
			templateIdCondition.toWrapper(wrapper, COL_TEMPLATE_ID);
		}
		if (skuTypeCondition != null) {
			skuTypeCondition.toWrapper(wrapper, COL_SKU_TYPE);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回礼包id查询条件
	 * 
	 * @return giftBagIdCondition 礼包id查询条件
	 */
	public Condition<String> giftBagId() {
		this.giftBagIdCondition = new Condition<>();
		return this.giftBagIdCondition;
	}
	
	/**
	 * 获取礼包id查询条件
	 * 
	 * @return giftBagIdCondition 礼包id查询条件
	 */
	public Condition<String> getGiftBagIdCondition() {
		return giftBagIdCondition;
	}

	/**
	 * 设置礼包id查询条件
	 * 
	 * @param giftBagIdCondition 礼包id查询条件
	 */
	public void setGiftBagIdCondition(Condition<String> giftBagIdCondition) {
		this.giftBagIdCondition = giftBagIdCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return busdIdCondition 查询条件
	 */
	public Condition<String> busdId() {
		this.busdIdCondition = new Condition<>();
		return this.busdIdCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return busdIdCondition 查询条件
	 */
	public Condition<String> getBusdIdCondition() {
		return busdIdCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param busdIdCondition 查询条件
	 */
	public void setBusdIdCondition(Condition<String> busdIdCondition) {
		this.busdIdCondition = busdIdCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return spuIdCondition 查询条件
	 */
	public Condition<String> spuId() {
		this.spuIdCondition = new Condition<>();
		return this.spuIdCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return spuIdCondition 查询条件
	 */
	public Condition<String> getSpuIdCondition() {
		return spuIdCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param spuIdCondition 查询条件
	 */
	public void setSpuIdCondition(Condition<String> spuIdCondition) {
		this.spuIdCondition = spuIdCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return skuIdCondition 查询条件
	 */
	public Condition<String> skuId() {
		this.skuIdCondition = new Condition<>();
		return this.skuIdCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return skuIdCondition 查询条件
	 */
	public Condition<String> getSkuIdCondition() {
		return skuIdCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param skuIdCondition 查询条件
	 */
	public void setSkuIdCondition(Condition<String> skuIdCondition) {
		this.skuIdCondition = skuIdCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return titleCondition 查询条件
	 */
	public Condition<String> title() {
		this.titleCondition = new Condition<>();
		return this.titleCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return titleCondition 查询条件
	 */
	public Condition<String> getTitleCondition() {
		return titleCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param titleCondition 查询条件
	 */
	public void setTitleCondition(Condition<String> titleCondition) {
		this.titleCondition = titleCondition;
	}

	/**
	 * 构造并返回数量查询条件
	 * 
	 * @return numCondition 数量查询条件
	 */
	public Condition<Integer> num() {
		this.numCondition = new Condition<>();
		return this.numCondition;
	}
	
	/**
	 * 获取数量查询条件
	 * 
	 * @return numCondition 数量查询条件
	 */
	public Condition<Integer> getNumCondition() {
		return numCondition;
	}

	/**
	 * 设置数量查询条件
	 * 
	 * @param numCondition 数量查询条件
	 */
	public void setNumCondition(Condition<Integer> numCondition) {
		this.numCondition = numCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return templateIdCondition 查询条件
	 */
	public Condition<String> templateId() {
		this.templateIdCondition = new Condition<>();
		return this.templateIdCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return templateIdCondition 查询条件
	 */
	public Condition<String> getTemplateIdCondition() {
		return templateIdCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param templateIdCondition 查询条件
	 */
	public void setTemplateIdCondition(Condition<String> templateIdCondition) {
		this.templateIdCondition = templateIdCondition;
	}

	/**
	 * 构造并返回[枚举]商品类型：0-优质好货-SKU、1-停车券-PARKCOUPON、2-现金券-CASHCOUPON查询条件
	 * 
	 * @return skuTypeCondition [枚举]商品类型：0-优质好货-SKU、1-停车券-PARKCOUPON、2-现金券-CASHCOUPON查询条件
	 */
	public Condition<GiftBagProRefSkuType> skuType() {
		this.skuTypeCondition = new Condition<>();
		return this.skuTypeCondition;
	}
	
	/**
	 * 获取[枚举]商品类型：0-优质好货-SKU、1-停车券-PARKCOUPON、2-现金券-CASHCOUPON查询条件
	 * 
	 * @return skuTypeCondition [枚举]商品类型：0-优质好货-SKU、1-停车券-PARKCOUPON、2-现金券-CASHCOUPON查询条件
	 */
	public Condition<GiftBagProRefSkuType> getSkuTypeCondition() {
		return skuTypeCondition;
	}

	/**
	 * 设置[枚举]商品类型：0-优质好货-SKU、1-停车券-PARKCOUPON、2-现金券-CASHCOUPON查询条件
	 * 
	 * @param skuTypeCondition [枚举]商品类型：0-优质好货-SKU、1-停车券-PARKCOUPON、2-现金券-CASHCOUPON查询条件
	 */
	public void setSkuTypeCondition(Condition<GiftBagProRefSkuType> skuTypeCondition) {
		this.skuTypeCondition = skuTypeCondition;
	}

}
